project(pairmodel)

#add_subdirectory(directory-path)

set(TAR_DISCOVER "client")
set(TAR_PROVIDER "server")

set(SRC_DISCOVER client.cpp)
set(SRC_PROVIDER server.cpp)

#NOTE: You don't need to add the path if your header and lib in the compiler default search path
#Add path to search include fies
#include_directories("/root/wspace/cpp/nng/installed_local_1101/include")
include_directories("/root/wspace/cpp/nng/installed_cross_1101/include")
#Add path to search libraries
#link_directories("/root/wspace/cpp/nng/installed_local_1101/lib")
link_directories("/root/wspace/cpp/nng/installed_cross_1101/lib")

add_executable(${TAR_DISCOVER} ${SRC_DISCOVER})
add_executable(${TAR_PROVIDER} ${SRC_PROVIDER})

target_link_libraries(${TAR_DISCOVER} PRIVATE 
        nng
        )

target_link_libraries(${TAR_PROVIDER} PRIVATE 
        nng
        )

#Search link modules by pkg-config tool
# find_package(PkgConfig REQUIRED)
# pkg_check_modules (SPDLOG REQUIRED IMPORTED_TARGET spdlog)

# target_link_libraries(${PROJECT_NAME} PRIVATE 
#         PkgConfig::SPDLOG
#         )
